package com.neusoft.my12306.controller;


import com.neusoft.my12306.common.res.CommonResult;

import com.neusoft.my12306.service.IStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 葛彬
 * @since 2023-07-18
 */
@RestController
@RequestMapping("/station")
public class StationController {
    @Autowired
    IStationService stationService;

    @GetMapping("/query/{city}")
    public CommonResult findByCity(@PathVariable String city) {

        return stationService.findByCity(city);
    }
}
